package com.oa.BaseDao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 获取当前事物
 * @author ly
 *
 */
public class BaseDao {
	
	   @Autowired 
	    private SessionFactory sessionFactory;  
	    public Session getCurrentSession(){  
	        return  sessionFactory.openSession();  
	    } 
	

}
